xen.git
18 years agox86_emulate: Provide callbacks for faster emulation of:
Keir Fraser [Tue, 22 Jan 2008 17:18:02 +0000 (17:18 +0000)]
x86_emulate: Provide callbacks for faster emulation of:
 REP MOVS, REP INS, REP OUTS.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoAdd MANDIR, MAN1DIR and MAN8DIR. Use it.
Keir Fraser [Tue, 22 Jan 2008 14:35:17 +0000 (14:35 +0000)]
Add MANDIR, MAN1DIR and MAN8DIR. Use it.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agoAdd SBINDIR. Use it always.
Keir Fraser [Tue, 22 Jan 2008 14:35:02 +0000 (14:35 +0000)]
Add SBINDIR. Use it always.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agoioemu: Use XEN_TARGET_ARCH instead of uname -m.
Keir Fraser [Tue, 22 Jan 2008 14:34:37 +0000 (14:34 +0000)]
ioemu: Use XEN_TARGET_ARCH instead of uname -m.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agoAdd BINDIR. Use it.
Keir Fraser [Tue, 22 Jan 2008 14:31:10 +0000 (14:31 +0000)]
Add BINDIR. Use it.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agoAdd INCLUDEDIR. Use it.
Keir Fraser [Tue, 22 Jan 2008 14:30:21 +0000 (14:30 +0000)]
Add INCLUDEDIR. Use it.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agoApply PREFIX directly to LIBDIR.
Keir Fraser [Tue, 22 Jan 2008 14:29:11 +0000 (14:29 +0000)]
Apply PREFIX directly to LIBDIR.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agoAdd PREFIX definition as base for all installed files.
Keir Fraser [Tue, 22 Jan 2008 14:27:22 +0000 (14:27 +0000)]
Add PREFIX definition as base for all installed files.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agominios: permit blkfront to write from mapped memory
Keir Fraser [Tue, 22 Jan 2008 14:20:37 +0000 (14:20 +0000)]
minios: permit blkfront to write from mapped memory
by adding a virtual_to_mfn macro

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: POSIX fixes
Keir Fraser [Tue, 22 Jan 2008 14:20:22 +0000 (14:20 +0000)]
minios: POSIX fixes
Fixes some functions which are POSIX.  Also make them ifndef HAVE_LIBC.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: fix case when _text is not 0
Keir Fraser [Tue, 22 Jan 2008 11:35:26 +0000 (11:35 +0000)]
minios: fix case when _text is not 0

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Fix x86_32 compilation
Keir Fraser [Tue, 22 Jan 2008 11:19:40 +0000 (11:19 +0000)]
minios: Fix x86_32 compilation

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agohvmloader: Expand iomem allocation pool to 0xf0000000-0xfc000000.
Keir Fraser [Tue, 22 Jan 2008 11:18:10 +0000 (11:18 +0000)]
hvmloader: Expand iomem allocation pool to 0xf0000000-0xfc000000.

Check for exhaustion of allocation pool, warn user, and fail to
initialise the relevant PCI BAR.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvmloader: Assign PCI resources in descending order of size for better packing.
Keir Fraser [Tue, 22 Jan 2008 10:54:00 +0000 (10:54 +0000)]
hvmloader: Assign PCI resources in descending order of size for better packing.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoXEN_GUEST_HANDLE_00030205() compat macro is broken. Remove it and
Keir Fraser [Tue, 22 Jan 2008 10:18:58 +0000 (10:18 +0000)]
XEN_GUEST_HANDLE_00030205() compat macro is broken. Remove it and
open-code an alternative at its two invocation sites.

Based on a patch by Jan Beulich.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxend: On block-attach, remove device information when VmError occurs.
Keir Fraser [Tue, 22 Jan 2008 09:51:49 +0000 (09:51 +0000)]
xend: On block-attach, remove device information when VmError occurs.

I tested xm block-attach command with a wrong
parameter(file:). Naturally a command error occurred. Then I retested
xm block-attach command with a correct parameter(phy:). But a command
error occurred again. The second command error occurred because Xend
did not remove device information from self.info when the first
command error occurred.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agohvm, ioemu: Fix the ide/cdrom emulation error on FC7 guest.
Keir Fraser [Tue, 22 Jan 2008 09:50:06 +0000 (09:50 +0000)]
hvm, ioemu: Fix the ide/cdrom emulation error on FC7 guest.

The new libata-eh in the Linux kernel is throwing a fit over the QEMU
cdrom device for two reasons:

1) DRQ can be set with ERR_STAT set.  This is a violation of the ATAPI
state machine.

2) After a TEST_UNIT_READY ATAPI command is sent ERR_STAT is getting
   set
which is correct.  But, when the OS issues another ATAPI command
ERR_STAT is still set.  Which is bad since the next expected command
from the OS is REQUEST_SENSE to find out why ERR_STAT is set.

bug this fixes: https://bugzilla.novell.com/show_bug.cgi?id=3D291775

Signed-off-by: Brandon Philips <bphilips@suse.de>
Porting this qemu fix to xen.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
18 years agovtd: Enable queued invalidation method if such HW support is
Keir Fraser [Tue, 22 Jan 2008 09:48:51 +0000 (09:48 +0000)]
vtd: Enable queued invalidation method if such HW support is
detected.  Otherwise, register invalidation method is used.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
18 years agominios: add blkfront testing
Keir Fraser [Tue, 22 Jan 2008 09:46:33 +0000 (09:46 +0000)]
minios: add blkfront testing

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios, blkfront: set default block path.
Keir Fraser [Tue, 22 Jan 2008 09:46:15 +0000 (09:46 +0000)]
minios, blkfront: set default block path.
remove unnecessary path head stripping.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Add align support to _xmalloc().
Keir Fraser [Tue, 22 Jan 2008 09:45:54 +0000 (09:45 +0000)]
minios: Add align support to _xmalloc().

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoMake tools/check scripts cross-friendly
Keir Fraser [Tue, 22 Jan 2008 09:44:17 +0000 (09:44 +0000)]
Make tools/check scripts cross-friendly

This patch introduces tools/check/funcs.sh with some
cross-friendly abstractions, then modifies the check_*
scripts to use them.

Signed-off-by: Aron Griffis <aron@hp.com>
18 years agoMake tools/Makefile cross-friendly
Keir Fraser [Tue, 22 Jan 2008 09:43:53 +0000 (09:43 +0000)]
Make tools/Makefile cross-friendly

Pass Xen cross-compilation options through to ioemu.
Export CROSS_SYS_ROOT for use by scripts.  Unexport
IOEMU_DIR since it isn't used outside of the Makefile.

Signed-off-by: Aron Griffis <aron@hp.com>
18 years agohvm: Allow PCI high-memory resource to be decided by hvmloader at
Keir Fraser [Mon, 21 Jan 2008 14:39:33 +0000 (14:39 +0000)]
hvm: Allow PCI high-memory resource to be decided by hvmloader at
HVM-guest boot time. Also make a few PCI0 resource ResourceProducer
type -- this seems to be specified by some randomly-sampled real ACPI
systems.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Sync cpu/intel_cacheinfo.c with Linux kernel
Keir Fraser [Mon, 21 Jan 2008 13:09:23 +0000 (13:09 +0000)]
x86: Sync cpu/intel_cacheinfo.c with Linux kernel
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
18 years agox86, xenoprof: Support Intel Penryn processors.
Keir Fraser [Mon, 21 Jan 2008 13:08:44 +0000 (13:08 +0000)]
x86, xenoprof: Support Intel Penryn processors.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>=20
18 years agominios: add lwIP 1.3.0 support
Keir Fraser [Mon, 21 Jan 2008 11:20:52 +0000 (11:20 +0000)]
minios: add lwIP 1.3.0 support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: make time interface POSIX
Keir Fraser [Mon, 21 Jan 2008 11:20:27 +0000 (11:20 +0000)]
minios: make time interface POSIX
timespec uses tv_sec and tv_nsec too. gettimeofday takes a tz
argument.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoxend: Handle unspecified timer_mode domain platform parameter.
Keir Fraser [Fri, 18 Jan 2008 22:27:51 +0000 (22:27 +0000)]
xend: Handle unspecified timer_mode domain platform parameter.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agominios: do not exit if FS backend not found.
Keir Fraser [Fri, 18 Jan 2008 16:20:47 +0000 (16:20 +0000)]
minios: do not exit if FS backend not found.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: support COW for a zero page
Keir Fraser [Fri, 18 Jan 2008 16:20:13 +0000 (16:20 +0000)]
minios: support COW for a zero page
Permits to support sparse data.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agodo_set_trap_table()'s argument can be const.
Keir Fraser [Fri, 18 Jan 2008 16:09:05 +0000 (16:09 +0000)]
do_set_trap_table()'s argument can be const.

Also, automatically generate const version of every guest handle
definition.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agodo_callback_op()'s second argument can be const allowing the guest to
Keir Fraser [Fri, 18 Jan 2008 15:46:58 +0000 (15:46 +0000)]
do_callback_op()'s second argument can be const allowing the guest to
declare these (mostly static) argument structures 'const'.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoMove primitive-type guest-handle definitions into common xen.h header file.
Keir Fraser [Fri, 18 Jan 2008 15:38:52 +0000 (15:38 +0000)]
Move primitive-type guest-handle definitions into common xen.h header file.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agopv-on-hvm: fix/adjust pv driver's mkbuildtree
Keir Fraser [Fri, 18 Jan 2008 15:28:59 +0000 (15:28 +0000)]
pv-on-hvm: fix/adjust pv driver's mkbuildtree

Allow invoking the script from other than the current directory (the
script now infers the tree is where the script lives). Print which
trees are actually being used.

Fix the linking of sources from Linux tree's drivers/xen/ - this was
needlessly invoking lndir on various sub-directories, in some cases
even twice.

Adjust the script to be able to deal with Linux 2.6.24's unified x86
include directory.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoxenctx/x86: fix format for readability and add information
Keir Fraser [Fri, 18 Jan 2008 15:27:02 +0000 (15:27 +0000)]
xenctx/x86: fix format for readability and add information
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agominios: extend map_frames into being able to map a series of
Keir Fraser [Fri, 18 Jan 2008 15:22:42 +0000 (15:22 +0000)]
minios: extend map_frames into being able to map a series of
contiguous frames, or the same frame several times, aligned, from
another domain, with specific protection, and with potential
failures.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: set text and rodata read-only, free unused pages 0 and 1
Keir Fraser [Fri, 18 Jan 2008 15:22:17 +0000 (15:22 +0000)]
minios: set text and rodata read-only, free unused pages 0 and 1
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoClarify 'xm mem-set' and 'xm vcpu-set' requirements in documentation.
Keir Fraser [Fri, 18 Jan 2008 13:43:26 +0000 (13:43 +0000)]
Clarify 'xm mem-set' and 'xm vcpu-set' requirements in documentation.
From: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovt-d: Clean up and bug fixes to ioapic handling.
Keir Fraser [Fri, 18 Jan 2008 13:41:33 +0000 (13:41 +0000)]
vt-d: Clean up and bug fixes to ioapic handling.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
18 years agoRevert network-nat script changes introduced by 16739:33dcf04d77152.
Keir Fraser [Fri, 18 Jan 2008 13:40:22 +0000 (13:40 +0000)]
Revert network-nat script changes introduced by 16739:33dcf04d77152.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: replace non-standard ulong with unsigned long
Keir Fraser [Fri, 18 Jan 2008 13:35:26 +0000 (13:35 +0000)]
ioemu: replace non-standard ulong with unsigned long

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoqemu-dm: Nicely terminate the device model script, to let it properly
Keir Fraser [Fri, 18 Jan 2008 13:35:05 +0000 (13:35 +0000)]
qemu-dm: Nicely terminate the device model script, to let it properly
clean resources.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoAdd FS backend/frontend drivers (frontend in minios only).
Keir Fraser [Fri, 18 Jan 2008 13:33:37 +0000 (13:33 +0000)]
Add FS backend/frontend drivers (frontend in minios only).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
18 years agominios: add blkfront
Keir Fraser [Thu, 17 Jan 2008 16:41:46 +0000 (16:41 +0000)]
minios: add blkfront

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agohvm: Extboot support for Xen
Keir Fraser [Thu, 17 Jan 2008 16:39:14 +0000 (16:39 +0000)]
hvm: Extboot support for Xen

This patch adds extboot to Xen.  It should be pretty harmless as the
moment because it's never enabled.  extboot allows arbitrary block
devices to be used to boot guests including SCSI and PV disks.  I've
tested it with both Windows and Linux guests in QEMU.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
18 years agominios: support several netfronts
Keir Fraser [Thu, 17 Jan 2008 15:50:48 +0000 (15:50 +0000)]
minios: support several netfronts

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoxm: Fix xm restore command.
Keir Fraser [Thu, 17 Jan 2008 15:23:47 +0000 (15:23 +0000)]
xm: Fix xm restore command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoMinor correction in xm man page for 'xm create'.
Keir Fraser [Thu, 17 Jan 2008 15:21:35 +0000 (15:21 +0000)]
Minor correction in xm man page for 'xm create'.
From: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agominios: add xenbus token support and separate watch event queues
Keir Fraser [Thu, 17 Jan 2008 15:20:02 +0000 (15:20 +0000)]
minios: add xenbus token support and separate watch event queues

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agotools: disable lomount and miniterm by default
Keir Fraser [Thu, 17 Jan 2008 15:18:38 +0000 (15:18 +0000)]
tools: disable lomount and miniterm by default

lomount is a tool which reads and parses a partition table in a disk
image block device and then uses mount -o ...offset=... to mount it.
This is not an ideal approach.  For example, if the intended
filesystem has corrupted metadata the kernel's filesystem driver may
start to write outside of the intended region.  This might even be
exploitable in some perverse circumstances.

Nowadays people wanting to do this should use kpartx, which uses
devmapper to create appropriate range mappings.  So lomount should be
disabled.

miniterm may well be useful but it is a clone-and-hack of an upstream
project and is currently built but not installed by default, partly
because it doesn't make sense to install on the dom0 which it might be
trying to debug.

It is probably useful to retain these two programs in the source tree
but IMO they should no longer be built by default.

The attached patch does these things:
 * CONFIG_LOMOUNT and CONFIG_MINITERM in Config.mk
   can enable and disable these programs
 * They are disabled by default
 * If CONFIG_MINITERM=y it is still built but not installed.
   make -C tools/misc/miniterm install  will install it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agotools: LDFLAGS in link lines
Keir Fraser [Thu, 17 Jan 2008 15:17:22 +0000 (15:17 +0000)]
tools: LDFLAGS in link lines

LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agonetwork scripts: SUSE has sensible use of ifup nowadays
Keir Fraser [Thu, 17 Jan 2008 15:14:17 +0000 (15:14 +0000)]
network scripts: SUSE has sensible use of ifup nowadays

While wading through the patches made to Xen by OpenSUSE in their
[s]rpm, I found that they have removed various special casing for ifup
on ther distribution.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agotools/docs: Fix example and default IP addresses.
Keir Fraser [Thu, 17 Jan 2008 15:13:40 +0000 (15:13 +0000)]
tools/docs: Fix example and default IP addresses.

In various places in documentation and code, IP addresses are provided
as examples, defaults, or dummy configuration.  In general the
specific IP addresses used in Xen are not always appropriate.  (For
example, 1.2.3.4 is used in a few places!)

The following addresses should be used:
 * For examples and documentation, 192.0.2.0/24.  (See RFC3330.)
 * For defaults for private networks, a random network from RFC1918.
   I have randomly selected 172.30.206.0/24 for this purpose and
   documented this in at the only registry I know of,
   www.ucam.org/cam-grin.  This network should henceforth be used for
   default configurations of local bridges, test networks, etc. in
   Xen tools.

The following addresses should NOT be used:
 * 10.0.*.*, 10.1.*.*, 192.168.0.*, 192.168.1.*, etc.  Using these
   addresses gives greatly increased likelihood of collision, as
   ignorant network administrators and reckless middlebox vendors
   often pick networks from the bottom of 10/8 and 192.168/16.
 * 169.254.*.*.  These are reserved for zeroconf (ad-hoc networking)
   and should not be used for Xen private networks, bridges, etc.,
   etc.  Use of these addresses by Xen scripts causes trouble on hosts
   (eg laptops) which find themselves in ad-hoc networking
   environments.  I think this is not hypothetical (!) since at least
   one Linux distribution have specific code to detect this case and
   cause Xen startup to fail iff the host already has an external
   zeroconf address.
 * 1.2.3.4.  WTF !?

I have also used 127.0.255.255 in one place where apparently a dummy
address is needed (some Linux kernels won't accept a lack of an NFS
server address).  If 127.0.255.255 is mistakenly used it is unlikely
to do any damage to real traffic even if it does escape into the
network at large.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agolibxen: Avoid declarations-after-statement (C++ coding style).
Keir Fraser [Thu, 17 Jan 2008 15:11:22 +0000 (15:11 +0000)]
libxen: Avoid declarations-after-statement (C++ coding style).
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
libxen: Use build-system CFLAGS and LDFLAGS.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agominios: add realloc
Keir Fraser [Thu, 17 Jan 2008 15:06:30 +0000 (15:06 +0000)]
minios: add realloc

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
18 years agominios: make stack size configurable
Keir Fraser [Thu, 17 Jan 2008 14:41:44 +0000 (14:41 +0000)]
minios: make stack size configurable

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
18 years agominios: add wait_event_deadline
Keir Fraser [Thu, 17 Jan 2008 14:41:12 +0000 (14:41 +0000)]
minios: add wait_event_deadline

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
18 years agominios: add trydown
Keir Fraser [Thu, 17 Jan 2008 14:40:55 +0000 (14:40 +0000)]
minios: add trydown

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: use ASSERT for BUG_ON
Keir Fraser [Thu, 17 Jan 2008 14:40:23 +0000 (14:40 +0000)]
minios: use ASSERT for BUG_ON

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Add exit_thread prototype. Make sure exit_thread doesn't
Keir Fraser [Thu, 17 Jan 2008 14:40:06 +0000 (14:40 +0000)]
minios: Add exit_thread prototype. Make sure exit_thread doesn't
return by accident.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Add noreturn attribute to do_exit
Keir Fraser [Thu, 17 Jan 2008 14:39:45 +0000 (14:39 +0000)]
minios: Add noreturn attribute to do_exit

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Optimize IA64's get_current()
Keir Fraser [Thu, 17 Jan 2008 14:39:21 +0000 (14:39 +0000)]
minios: Optimize IA64's get_current()

Let gcc access r13 itself, leading to better code

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
18 years agoUpdate API changelog for new feature flags.
Keir Fraser [Thu, 17 Jan 2008 13:03:22 +0000 (13:03 +0000)]
Update API changelog for new feature flags.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Allocate an unmapped guard page to separate ordinary low RAM
Keir Fraser [Thu, 17 Jan 2008 12:59:10 +0000 (12:59 +0000)]
hvm: Allocate an unmapped guard page to separate ordinary low RAM
from special pages (ioreq, xenstore, etc). This will stop some probe
functions (e.g., embedded in memtest) from stomping on the special
pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoamd hvm (svm): Print warning if NPT constraints on PAE are hit.
Keir Fraser [Wed, 16 Jan 2008 15:55:57 +0000 (15:55 +0000)]
amd hvm (svm): Print warning if NPT constraints on PAE are hit.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxenconsoled: Make slave pty raw during initialization.
Keir Fraser [Wed, 16 Jan 2008 13:44:18 +0000 (13:44 +0000)]
xenconsoled: Make slave pty raw during initialization.
(This avoids echo).

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years agox86: New feature flag XENFEAT_mmu_pt_update_preserve_ad.
Keir Fraser [Wed, 16 Jan 2008 13:27:59 +0000 (13:27 +0000)]
x86: New feature flag XENFEAT_mmu_pt_update_preserve_ad.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Reserve a CPUID feature bit to advertise new
Keir Fraser [Wed, 16 Jan 2008 11:44:41 +0000 (11:44 +0000)]
x86: Reserve a CPUID feature bit to advertise new
MMU_PT_UPDATE_PRESERVE_AD hypercall command.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Document the new MMU_PT_UPDATE_PRESERVE_AD hypercall.
Keir Fraser [Tue, 15 Jan 2008 21:23:37 +0000 (21:23 +0000)]
x86: Document the new MMU_PT_UPDATE_PRESERVE_AD hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years ago-DNDEBUG for hypervisor only
Keir Fraser [Tue, 15 Jan 2008 18:50:44 +0000 (18:50 +0000)]
-DNDEBUG for hypervisor only
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agolibxen: Fix function prototype.
Keir Fraser [Tue, 15 Jan 2008 18:48:32 +0000 (18:48 +0000)]
libxen: Fix function prototype.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agoMerge with ia64 tree.
Keir Fraser [Tue, 15 Jan 2008 14:39:23 +0000 (14:39 +0000)]
Merge with ia64 tree.

18 years agox86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Keir Fraser [Tue, 15 Jan 2008 14:32:15 +0000 (14:32 +0000)]
x86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoUpdate version to 3.3-unstable.
Keir Fraser [Tue, 15 Jan 2008 14:27:15 +0000 (14:27 +0000)]
Update version to 3.3-unstable.

18 years agoxend: Remove hardcoded (and apparently unused) xend version.
Keir Fraser [Tue, 15 Jan 2008 14:24:05 +0000 (14:24 +0000)]
xend: Remove hardcoded (and apparently unused) xend version.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
18 years agohvm, x86: Add QEMU BIOS menu for choosing boot device.
Keir Fraser [Tue, 15 Jan 2008 14:22:50 +0000 (14:22 +0000)]
hvm, x86: Add QEMU BIOS menu for choosing boot device.

The attached patch implements a mini BIOS menu for choosing a
non-default
boot device. When a guest starts it'll display

   'Press F10 to select boot device'

And wait 3 seconds, before continuing with the normal boot device. If
they press the F10 key, a menu is shown allowing a choice between
floppy, harddisk, cdrom and network (PXE).

I can't take credit for this originally - Jeremy Katz wrote it for
KVM, I merely re-diffed the patch to work against Xen's QEMU/BIOS code
tree. It has been tested in Fedora successfully against 3.1.x and 3.2.x

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
CC: Jeremy Katz <katzj@redhat.com>
If more than one boot device has been selected, the currently selected
number displayed in the menu is wrong.

Signed-off-by: Stefano Stabellini <stefano.stabellini@citrix.com>
18 years agoblktap: factor out linux specific code
Keir Fraser [Tue, 15 Jan 2008 14:17:22 +0000 (14:17 +0000)]
blktap: factor out linux specific code
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years ago[IA64] Fix security vulnerability
Alex Williamson [Tue, 15 Jan 2008 14:07:01 +0000 (07:07 -0700)]
[IA64] Fix security vulnerability

DomU can map any other domain's memory.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
18 years agox86: INT3 and INTO trap gates should have DPL==3.
Keir Fraser [Tue, 15 Jan 2008 11:29:15 +0000 (11:29 +0000)]
x86: INT3 and INTO trap gates should have DPL==3.
This was broken by c/s 16667 (gdbstub changes).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoAdded tag 3.2.0-rc6 for changeset 9facc624a238
Keir Fraser [Sun, 13 Jan 2008 10:50:18 +0000 (10:50 +0000)]
Added tag 3.2.0-rc6 for changeset 9facc624a238

18 years agoUpdate version to xen-3.2.0-rc6
Keir Fraser [Sun, 13 Jan 2008 10:50:13 +0000 (10:50 +0000)]
Update version to xen-3.2.0-rc6

18 years agox86: Fix PV PIT handler after previous changeset.
Keir Fraser [Sat, 12 Jan 2008 11:26:04 +0000 (11:26 +0000)]
x86: Fix PV PIT handler after previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Improve in-Xen PIO emulation to better handle string PIO
Keir Fraser [Sat, 12 Jan 2008 11:13:57 +0000 (11:13 +0000)]
hvm: Improve in-Xen PIO emulation to better handle string PIO
instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agosvm: Properly mask unsupported bits in CPUID_80000001_ECX.
Keir Fraser [Sat, 12 Jan 2008 09:29:38 +0000 (09:29 +0000)]
svm: Properly mask unsupported bits in CPUID_80000001_ECX.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: hpet: Tidy up hpet_to_ns_limit calculation.
Keir Fraser [Fri, 11 Jan 2008 11:01:36 +0000 (11:01 +0000)]
hvm: hpet: Tidy up hpet_to_ns_limit calculation.
Suggested by Haitao Shan @ Intel.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovmxassist: Emulate CLTS.
Keir Fraser [Fri, 11 Jan 2008 10:59:48 +0000 (10:59 +0000)]
vmxassist: Emulate CLTS.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
Keir Fraser [Fri, 11 Jan 2008 10:53:44 +0000 (10:53 +0000)]
x86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
vmexit handling, before IO-APIC can be EOIed or unmasked and resample
the fake INTx line.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Fix near CALL/JMP <reg,mem>. Broken by c/s 16491.
Keir Fraser [Thu, 10 Jan 2008 22:53:43 +0000 (22:53 +0000)]
x86_emulate: Fix near CALL/JMP <reg,mem>. Broken by c/s 16491.
Thanks to AMD for narrowing this one down.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Certain opcodes are only valid with a memory operand.
Keir Fraser [Thu, 10 Jan 2008 22:52:40 +0000 (22:52 +0000)]
x86_emulate: Certain opcodes are only valid with a memory operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoFix network-bridge shell quoting.
Keir Fraser [Thu, 10 Jan 2008 15:30:46 +0000 (15:30 +0000)]
Fix network-bridge shell quoting.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agoAdded tag 3.2.0-rc5 for changeset 36bb2ab4722733d919d32e4555eb46cc6a06cb8f
Keir Fraser [Wed, 9 Jan 2008 22:21:58 +0000 (22:21 +0000)]
Added tag 3.2.0-rc5 for changeset 36bb2ab4722733d919d32e4555eb46cc6a06cb8f

18 years agoUpdate version to 3.2.0-rc5
Keir Fraser [Wed, 9 Jan 2008 22:21:49 +0000 (22:21 +0000)]
Update version to 3.2.0-rc5

18 years agox86_emulate: Fix handling of RIP-relative addressing.
Keir Fraser [Wed, 9 Jan 2008 22:21:28 +0000 (22:21 +0000)]
x86_emulate: Fix handling of RIP-relative addressing.
The handling of SHLD/SHRD introduced in 16696:b5b3e27f1af3f7 was
incorrect; thanks to Gary Grebus @ Virtual Iron for spotting it.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovt-d: Fix print_vtd_entries walk VTd mapping table.
Keir Fraser [Wed, 9 Jan 2008 10:35:52 +0000 (10:35 +0000)]
vt-d: Fix print_vtd_entries walk VTd mapping table.

DMA request to above guest physical memory will cause VTd fault, in
which print_vtd_entries() tries to walk VTd mapping table. However,
during walking, current Xen code didn't check if the PTE is valid and
may access to invalid memory address.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
18 years agohvm: hpet: Clamp period to sane values to prevent excessive looping in
Keir Fraser [Wed, 9 Jan 2008 10:32:13 +0000 (10:32 +0000)]
hvm: hpet: Clamp period to sane values to prevent excessive looping in
hpet_timer_fn(), or excessive numbers of set_timer() callbacks.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
Keir Fraser [Wed, 9 Jan 2008 10:11:31 +0000 (10:11 +0000)]
x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
immediate byte third operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoFix x86_emulate() handling of imul with immediate operands.
Keir Fraser [Wed, 9 Jan 2008 10:09:04 +0000 (10:09 +0000)]
Fix x86_emulate() handling of imul with immediate operands.

This fixes a repeatable crash in RHEL 4.2 ext2 filesystem during boot.

Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
18 years agox86: Fix a comment in get_page_type().
Keir Fraser [Tue, 8 Jan 2008 16:45:08 +0000 (16:45 +0000)]
x86: Fix a comment in get_page_type().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: hpet: Fix overflow when converting to nanoseconds.
Keir Fraser [Tue, 8 Jan 2008 16:20:04 +0000 (16:20 +0000)]
hvm: hpet: Fix overflow when converting to nanoseconds.

Currently in hpet_tick_to_ns, the approach is multiplying first, which
easily causes overflow when tick is quite large. The patch cannot
handle arbitratry large ticks duo to the precision requirement and
64bit's value range. But by optimize the equation, a larger ticks than
current code can be supported. Also an overflow check is added before
the calculation.

From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>